<template>
  <view class="wrapper">
    <video-full v-if="url" :url="url" @close="handleClose" />
    <view v-else class="empty"><text>无效的视频地址</text></view>
  </view>
</template>

<script>
import VideoFull from '@/components/video/video-full.vue'

export default {
  name: 'VideoPreviewPage',
  components: { VideoFull },
  data() {
    return { url: '' }
  },
  onLoad(query) {
    this.url = decodeURIComponent(query.url || '')
  },
  methods: {
    handleClose() {
      uni.navigateBack()
    }
  }
}
</script>

<style lang="scss" scoped>
.wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; }
.empty { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; color: #fff; display: flex; align-items: center; justify-content: center; background: #000; }
</style>


